package rong.common.interceptor;

import javax.annotation.Resource;

import rong.common.entity.Authority;
import rong.common.entity.User;
import rong.common.service.AuthorityService;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class AuthorityInterceptor implements Interceptor {

	@Resource
	private AuthorityService authorityService;
	
	private User user;
	
	
	public void destroy() {
		// TODO Auto-generated method stub

	}

	public void init() {
		user = (User)ActionContext.getContext().getSession().get("loginUser");

	}

	public String intercept(ActionInvocation invocation) throws Exception {
		
		String result = invocation.invoke();
		return result;
		
	}

}
